From: tsteven4 Date: Sun, 3 Mar 2019 17:33:14 +0000 (-0700) Subject: clang-tidy readability-static-accessed-through-instance on gui. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~8^2~32^2~6 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22Program/%22http:/www.example.com/cgi/%22https:/%22Program?a=commitdiff_plain;h=ffdf60a2c10373c51887e24256f94c2909b4c3b3;p=gpsbabel.git clang-tidy readability-static-accessed-through-instance on gui. --- diff --git a/gui/main.cc b/gui/main.cc index 77762f3a9..d92cc7bb5 100644 --- a/gui/main.cc +++ b/gui/main.cc @@ -49,9 +49,8 @@ int main(int argc, char** argv) #error this version of Qt is not supported. #endif - QApplication* app; - app = new QApplication(argc, argv); - app->setWindowIcon(QIcon(":/images/appicon.png")); + QApplication app(argc, argv); + QApplication::setWindowIcon(QIcon(":/images/appicon.png")); QString newPath = "PATH=" + QApplication::applicationDirPath() + QString(pathSeparator) + getenv("PATH"); @@ -65,7 +64,7 @@ int main(int argc, char** argv) MainWindow mainWindow(nullptr); mainWindow.show(); - app->exec(); + QApplication::exec(); return 0; }